From 8fc360dac5e451a9c6949e8b2473d603a9a9c2b5 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 5 Mar 2020 03:57:53 +0100 Subject: [PATCH] imcontextwayland: Fix copy/paste error --- gtk/gtkimcontextwayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkimcontextwayland.c b/gtk/gtkimcontextwayland.c index 9511ae6978..393f9b91c6 100644 --- a/gtk/gtkimcontextwayland.c +++ b/gtk/gtkimcontextwayland.c @@ -321,7 +321,7 @@ notify_surrounding_text (GtkIMContextWayland *context) } mid = MIN (context->surrounding.cursor_idx, - context->surrounding.cursor_idx) + (cursor_len / 2); + context->surrounding.anchor_idx) + (cursor_len / 2); a = MAX (0, mid - (MAX_LEN / 2)); b = MIN (MAX_LEN, mid + (MAX_LEN / 2)); -- 2.30.2